package com.agan.rocket.service;

import com.agan.rocket.constant.SystemConstant;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;
/**
 * @author weicj
 * @since 2025.01.24
 */
@Service
@RocketMQMessageListener(topic = SystemConstant.TOPIC, consumerGroup = "my-consumer-group")
public class MyConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String message) {
        System.out.println("Received message: " + message);
    }
}